⚡ Bolt: [성능 최적화] process_dir 내 정적 에셋(CSS/해시) 객체 추출로 불필요한 할당 제거 - #279
⚡ Bolt: [성능 최적화] process_dir 내 정적 에셋(CSS/해시) 객체 추출로 불필요한 할당 제거#279seonghobae wants to merge 1 commit into
Conversation
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Warning Review limit reached
Next review available in: 3 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
This PR optimizes the Kotlin CLI’s per-directory HTML generation by extracting static CSS content and its CSP SHA-256 hash calculation out of process_dir, so they’re computed once per JVM lifetime rather than on every directory processed.
Changes:
- Introduces a
private object StaticAssetsto hold the CSS payload and its CSPsha256-...hash. - Updates
process_dirto referenceStaticAssets.css/StaticAssets.styleHashinstead of recomputing them. - Records the optimization rationale in
.jules/bolt.md.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/main/kotlin/html4tree/main.kt | Extracts static CSS and CSP hash into StaticAssets and updates process_dir to reuse them. |
| .jules/bolt.md | Adds a Bolt learning/action entry documenting the static-assets extraction optimization. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const val css = """ | ||
| <style> | ||
| ${cssContent} </style> | ||
| """ |
|
Closing as superseded by canonical #363. The same static-assets extraction is implemented there together with exact CSP source-byte correctness, an independent generated-file digest regression, APA 7 doctoring, changelog, and fresh current-head CI/JaCoCo/security evidence. Getter-avoidance coverage scaffolding and broad resource claims from this duplicate are not retained. No evidence is reused. |
Understood. Acknowledging that this work is superseded by #363 and stopping work on this task. |
process_dir함수 내에서 매번 생성되던 정적 CSS 콘텐츠와 SHA-256 해시 연산을private object StaticAssets로 분리하여 한 번만 계산되도록 최적화했습니다.@JvmField와const val을 사용하여 컴파일러가 생성하는 getter로 인한 커버리지 누락을 방지했습니다.process_dir을 호출할 때 불필요한 문자열 메모리 할당 및 해시 연산에 따른 CPU/GC 오버헤드가 발생하는 성능 병목 현상이 있었습니다../gradlew clean test jacocoTestReport jacocoTestCoverageVerification를 실행하여 100% 커버리지를 유지하면서 모든 기능이 정상 작동함을 확인했습니다.PR created automatically by Jules for task 5456096087941995695 started by @seonghobae